﻿package com.smart.loader {		import flash.display.*;	import flash.events.*;	import flash.net.*;		public class SimpleImageLoader extends EventDispatcher {				private var _loader:Loader;		private var _bitmap:Bitmap;				public function SimpleImageLoader(path:String) {			_loader = new Loader();			_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);						try {				_loader.load(new URLRequest(path));			} catch (err:Error) {				trace("Unable to load image:\n" + err.message);			}				}				private function imageLoaded(e:Event):void {			_bitmap = e.target.content;						dispatchEvent(new Event("imageLoaded"));			_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, imageLoaded);		}				public function get image():Bitmap {			return _bitmap;		}			}	}